@echo off
cd "your file location"

:: List of required Python packages
set PACKAGES=pyserial matplotlib numpy

:: Check and install each package
for %%p in (%PACKAGES%) do (
    python -m pip show %%p >nul 2>&1
    if errorlevel 1 (
        echo Installing %%p...
        python -m pip install %%p
    )
)

:: Run the SONAR Visual program
python "180_SONAR_Visual.py"
pause
